home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / doc / RecordEval.3 < prev    next >
Text File  |  1993-04-16  |  2KB  |  61 lines

  1. '\"
  2. '\" Copyright (c) 1989-1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/RecordEval.3,v 1.9 93/04/16 15:02:27 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tcl_RecordAndEval tclc
  25. .BS
  26. .SH NAME
  27. Tcl_RecordAndEval \- save command on history list before evaluating
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tcl.h>\fR
  31. .sp
  32. int
  33. \fBTcl_RecordAndEval\fR(\fIinterp, cmd, eval\fR)
  34. .SH ARGUMENTS
  35. .AS Tcl_Interp *interp;
  36. .AP Tcl_Interp *interp in
  37. Tcl interpreter in which to evaluate command.
  38. .AP char *cmd in
  39. Command (or sequence of commands) to execute.
  40. .AP int eval in
  41. 0 means evaluate \fIcmd\fR, TCL_NO_EVAL means record it but don't
  42. evaluate it.
  43. .BE
  44.  
  45. .SH DESCRIPTION
  46. .PP
  47. \fBTcl_RecordAndEval\fR is invoked to record a command as an event
  48. on the history list and then execute it.
  49. It returns a completion code such as TCL_OK just like \fBTcl_Eval\fR
  50. and it leaves information in \fIinterp->result\fR.
  51. If you don't want the command recorded on the history list then
  52. you should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR.
  53. Normally \fBTcl_RecordAndEval\fR is only called with top-level
  54. commands typed by the user, since the purpose of history is to
  55. allow the user to re-issue recently-invoked commands.
  56. If the \fIeval\fR argument is TCL_NO_EVAL then the command is
  57. recorded without being evaluated.
  58.  
  59. .SH KEYWORDS
  60. command, event, execute, history, interpreter, record
  61.